#!/usr/bin/env python
#  TCP-Client
import socket
import sys

sk_obj = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sk_obj.connect(('127.0.0.1', 8000))
while True:
    msg = input('-->').strip()
    if len(msg) == 0:
        continue
    sk_obj.send(msg.encode('utf-8'))
    data = sk_obj.recv(8096)
    print('Server send information : %s' % data.decode('utf-8'))
sk_obj.close()